package com.itheima.Jiuye06;

import java.time.LocalDate;
import java.util.Scanner;

public class Zuoye01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入需要查找的年份：");
        int a = sc.nextInt();
        LocalDate localDate = LocalDate.of(a + 1, 1, 1);
        LocalDate l  =  localDate.plusDays(-1);
        if (l.getDayOfYear() == 366){
            System.out.println("是闰年");
        }else {
            System.out.println("是平年");
        }
        LocalDate localDate1 = LocalDate.of(a, 3, 1);
        LocalDate localDate2 = localDate1.plusDays(-1);
        if (localDate2.getDayOfMonth() == 28){
            System.out.println(a+"是平年");
        }else {
            System.out.println("是闰年");
        }
    }
}
